<template>
  <div class="">
    <hr />
    全选<input
      type="checkbox"
      v-model="$store.state.checked"
      @change="checkall"
    />
    已选择：{{ $store.state.result.length }}/全部：{{
      $store.state.list.length
    }}

    <button v-show="$store.state.result.length > 0" @click="clear">
      删除选中
    </button>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  methods: {
    checkall() {
      this.$store.commit("checkall");
    },
    clear() {
      this.$store.commit("clear");
    },
  },
  components: {},
};
</script>

<style lang="scss"></style>
